<!-- 页面 -->
<template>
    <div style="xq">
        <van-nav-bar title="分类详情" style="width: red;" left-arrow @click-left="hui()" />
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="(item, index) in list.gallery" :key="index">
                <img v-lazy="item.img_url" style="width: 100%;" alt="">
            </van-swipe-item>
        </van-swipe>
        <div class="iiim" v-html="list.info.goods_desc"></div>
        <van-goods-action>
            <van-goods-action-icon icon="chat-o" text="客服"  />
            <van-goods-action-icon icon="cart-o" text="购物车" @click="gou()" />
            <van-goods-action-icon icon="shop-o" text="店铺"  />
            <van-goods-action-button type="danger" text="加入购物车" @click="gw()" />
        </van-goods-action>
    </div>
</template>
<!-- vue -->
<script>

export default {
    data() {
        return {
            // 声明的属性
            id: '',
            list: [],
            active: 0,
        }
    },
    //生命周期函数
    created() {
        this.id = this.$route.query.id
        this.$axios.get('http://shop.bufantec.com/bufan/goods/detailaction?openId=13216484256&id=' + this.id,).then(res => {
            this.list = res.data
            console.log(res);
            console.log(this.list);
        })
    },
    mounted() {


    },
    // 调用方法
    methods: {
        hui() {
            this.$router.go(-1)
        },
        gou(){
            this.$router.push('/gou')
        },
        gw(){
            
        }
    },
    // 监听器
    watch: {
    },
    // 计算属性
    computed: {
    },
    // 过滤器
    filters: {
    },
    // 自定义指令
    directives: {
    }
}
</script>
<!-- css样式 -->
<style>
.iiim p {
    display: block;
    width: 100% !important;
}

.iiim p img {
    width: 100%;
}
</style>